﻿<UserControl x:Class="RiaCrm.Shell.Shell"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Regions="clr-namespace:Microsoft.Practices.Composite.Presentation.Regions;assembly=Microsoft.Practices.Composite.Presentation"
    xmlns:tool="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
    xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    MinHeight="200" MinWidth="200">
    <UserControl.Resources>
        <Style x:Key="TopGrid" TargetType="Grid">
            <Setter Property="Background" Value="#FF5C7590" />
        </Style>
    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot" Style="{StaticResource TopGrid}" ShowGridLines="False">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200"/>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid x:Name="ResultsRoot" Grid.Column="1" ShowGridLines="False">
            <Grid.RowDefinitions>
                <RowDefinition Height="50"/>
                <RowDefinition Height="200"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="30"/>
            </Grid.RowDefinitions>
            <basics:GridSplitter Grid.Row="2" 
                                 VerticalAlignment="Top" 
                                 HorizontalAlignment="Stretch" 
                                 Margin="5"
                                 Height="10"/>
            <!-- Searching -->
            <StackPanel Grid.Row="0" Background="White">
                <ContentControl Regions:RegionManager.RegionName="SearchRegion"  
                                HorizontalContentAlignment="Stretch" 
                                VerticalContentAlignment="Stretch" />
            </StackPanel>
            
            <!-- Master Region -->
            <ContentControl Regions:RegionManager.RegionName="TopResultsRegion" 
                                HorizontalContentAlignment="Stretch" 
                                VerticalContentAlignment="Stretch"
                                Grid.Row="1"/>
               
            <!-- Details Region -->
            <Grid Grid.Row="2" 
                  HorizontalAlignment="Stretch"               
                  VerticalAlignment="Stretch">
                
                <ContentControl Regions:RegionManager.RegionName="ButtonResultsRegion" 
                                HorizontalContentAlignment="Stretch" 
                                VerticalContentAlignment="Stretch"
                                Margin="0,25,0,5" />
            </Grid>
            <StackPanel Grid.Column="1" Grid.Row="3" Orientation="Horizontal">
                <ContentControl 
                    Regions:RegionManager.RegionName="ButtonNavRegion" 
                        VerticalAlignment="Bottom"/>
            </StackPanel>
        </Grid>
        
        <!-- Sitmap  -->
        <Grid Background="White">
            <Border CornerRadius="40" BorderBrush="Silver" Margin="3" BorderThickness="3" Background="White" Canvas.ZIndex="2">
                <StackPanel x:Name="navArea" Margin="5">
                    <ContentControl 
                    Regions:RegionManager.RegionName="SitemapRegion" 
                    
                    />
                </StackPanel>
            </Border>
        </Grid>
    </Grid>
</UserControl>
